package com.liang.configclient;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 配置客户端
 *
 * @author liangyehao
 * @date 2021/03/23
 */
@SpringBootApplication
@RestController
public class ConfigClient {
    public static void main(String[] args) {
        SpringApplication.run(ConfigClient.class,args);
    }


    @Value("${test.location}")
    private String location;

    @Value("${test.name}")
    private String name;

    @GetMapping("/testConfig")
    public String testConfig(){
        return "location:"+location+",name:"+name;
    }
}
